package com.desktop.click.tool.util;

import java.awt.*;

public class MouseUtil {
    /**
     * 获取鼠标横坐标位置
     *
     * @return java.lang.Integer
     * @date 2023/2/10 14:54
     * @author glq
     */
    public static Integer getMouseX() {
        Point location = MouseInfo.getPointerInfo().getLocation();
        return (int) location.getX();
    }

    /**
     * 获取鼠标纵坐标位置
     *
     * @return java.lang.Integer
     * @date 2023/2/10 14:54
     * @author glq
     */
    public static Integer getMouseY() {

        Point location = MouseInfo.getPointerInfo().getLocation();
        return (int) location.getY();
    }

}
